/*
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tr.edu.ozyegin.ccrg.monitor.network;

/**
 *
 * @author becomen
 */
public class Nic {
    private long received = 0;
    private long transmitted = 0;
    private long receivedOld = 0;
    private long transmittedOld = 0;
    private int capacity = 104857600;
    private String name = "";
    
    public String getName(){
        return this.name;
    }
    
    private String setName(String name){
        return this.name = name;
    }
    
    public long getReceived(){
        return this.received - this.receivedOld;
    }
    
    public long setReceived(long received){
        this.receivedOld = this.received;
        return this.received = received;
    }
    
    public long getTransmitted(){
        return this.transmitted - this.transmittedOld;
    }
    
    public long setTransmitted(long transmitted){
        this.transmittedOld = this.transmitted;
        return this.transmitted = transmitted;
    }
    
    public int getCapacity(){
        return this.capacity;
    }
    
    private int setCapacity(int capacity){
        return this.capacity = capacity;
    }
    
    public Nic(String name, int capacity){
        this.setName(name);
        this.setCapacity(capacity);
    }
}
